import 'package:azlistview/azlistview.dart';

/// name : "ss"
/// city_code : "ddd"
/// first_character : "a"

class CityBean with ISuspensionBean{
  String _name;
  String _cityCode;
  String _firstCharacter;

  String get name => _name;
  String get cityCode => _cityCode;
  String get firstCharacter => _firstCharacter;

  CityBean({
      String name, 
      String cityCode, 
      String firstCharacter}){
    _name = name;
    _cityCode = cityCode;
    _firstCharacter = firstCharacter;
}

  CityBean.fromJson(dynamic json) {
    _name = json["name"];
    _cityCode = json["city_code"];
    _firstCharacter = json["first_character"];
  }

  Map<String, dynamic> toJson() {
    var map = <String, dynamic>{};
    map["name"] = _name;
    map["city_code"] = _cityCode;
    map["first_character"] = _firstCharacter;
    return map;
  }

  @override
  String getSuspensionTag() {
    return firstCharacter;
  }

}